

from werkzeug.wrappers import request
from flask import request
import  json

def get_data():
    data = request.data
    if data:
        data = json.loads(request.data)
    else:
        data = request.form
    return data